Skip to content

TPC: Processing of common mode values in O2#15137

Draft
tubagundem wants to merge 5 commits intoAliceO2Group:devfrom
tubagundem:TPC_CMV
Draft

TPC: Processing of common mode values in O2#15137
tubagundem wants to merge 5 commits intoAliceO2Group:devfrom
tubagundem:TPC_CMV

Conversation

@tubagundem
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

Copy link
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the class methods with lot of code be moved from the header to cxx file (including needed headers, like TFile.h and TTree.h in https://github.com/AliceO2Group/AliceO2/pull/15137/changes#diff-74cad5f291e0478b7a6334eb7e3dcdabbad615a01df0db129d836a337e76582aR26-R27 ?

Copy link
Collaborator

@wiechula wiechula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tubagundem , some minor things and a couple questions:

  • How different are the CMVToVectorSpec.h and the corresponding IDC code? Could it have a common base to?
  • What is done in the TPCFactorizeCMVSpec.h? I think in the CMV we don't do factorization.

/// Header definition of the CMVs
struct Header {
static constexpr uint8_t MagicWord = 0xDC;
union {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use the same structure as in IDC.h: the words are 64 bit and then split up.


/// CMV single data container
struct Data {
uint16_t CMV{0}; ///< 16bit ADC value
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming convention

Suggested change
uint16_t CMV{0}; ///< 16bit ADC value
uint16_t cmv{0}; ///< 16bit ADC value

Comment on lines +81 to +90
// Point branches directly at the vector data — single Fill() call writes all rows
float* pCmv = const_cast<float*>(cmvValues.data());
uint32_t* pCru = const_cast<uint32_t*>(cru.data());
uint32_t* pTimebin = const_cast<uint32_t*>(timebin.data());
uint32_t* pTf = const_cast<uint32_t*>(tf.data());

tree->Branch("cmv", pCmv, fmt::format("cmv[{}]/F", n).c_str());
tree->Branch("cru", pCru, fmt::format("cru[{}]/i", n).c_str());
tree->Branch("timebin", pTimebin, fmt::format("timebin[{}]/i", n).c_str());
tree->Branch("tf", pTf, fmt::format("tf[{}]/i", n).c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you directly fill the vectors into the tree (blow), or even write the full class? I guess this function also does not need to be const.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants